package com.friends.digitpic.service.service.impl;

import javax.annotation.Resource;

import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Component;
import com.friends.digitpic.service.dao.PictypeDao;
import com.friends.digitpic.service.entity.PictypeEntity;
import com.friends.digitpic.service.service.PictypeService;

/**
 * 描述：图片类型
 * @author: jiangge xia
 * @since：2018年09月15日 22时44分21秒 星期六 
 * @version:1.0
 */

@Transactional
@Component
public class PictypeServiceImpl implements PictypeService {

	@Resource(name = "pictypeDao")
	private PictypeDao pictypeDao;


	public PictypeEntity getPictype(String pictypeid) {
		return pictypeDao.get(pictypeid);
	}

	public int updatePictype(PictypeEntity pictype) {
		return pictypeDao.update(pictype);
	}

	public void insertPictype(PictypeEntity pictype) {
		pictypeDao.insert(pictype);
		
	}

	public MiniDaoPage<PictypeEntity> getPictypeAll(PictypeEntity pictype, int page, int rows) {
		return pictypeDao.getAll(pictype, page, rows);
	}

	public void deletePictype(PictypeEntity pictype) {
		pictypeDao.delete(pictype);
		
	}
}
